<template>
	<app-page>
		<wd-config-provider :theme="theme">
			<view class="container">
				<view class="title">{{
					info.title
				}}</view>
				<view class="desc">{{
					info.create_time
				}}</view>
				<!-- 	<view class="desc">颁布日期：{{
					info.pub_date
				}}</view>
				<view class="desc">施行日期：{{
					info.imp_date
				}}</view> -->
				<mp-html :content="info.info" />
				<!-- <view class="content">{{ info.content }}</view> -->
			</view>
		</wd-config-provider>
	</app-page>
</template>

<script lang="ts">
	import { defineComponent, ref } from 'vue';

	import { onLoad } from '@dcloudio/uni-app';

	import { getIndexTaskInfo } from "@/api/temp";

	export default defineComponent({
		name: '',
		components: {},
		setup(props, ctx) {
			// 日间light、夜间dark主题
			const theme = ref('light');
			const info = ref({
				id: 0,
				title: "",
				pub_date: "",
				imp_date: "",
				wenzi_number: "",
			});
			onLoad((params) => {
				if (params.id) {
					getIndexTaskInfo({
						id: params.id
					}).then((res : any) => {
						info.value = res;
					})
				}
			})
			return {
				theme,
				info,
			};
		}
	});
</script>

<style lang="less" scoped>
	.container {
		padding: 24rpx;

		.title {
			font-size: 32rpx;
			font-weight: bold;
			margin-bottom: 24rpx;
		}

		.desc {
			font-size: 28rpx;
			color: #666;
			margin-bottom: 16rpx;
		}
	}
</style>